#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_mkdir.py
# author:wmf
# datetime:2021/3/27 10:04
# software: PyCharm
'''
this is function description
'''
# import module your need

import os
from datetime import datetime

#getcwd--获取当前工作目录
print(os.getcwd())

pwd = os.path.abspath('.')
print('       Size   Last Modified Name')
print('----------------------------')
for f in os.listdir(pwd):
    fsize = os.path.getsize(f)
    mtime = datetime.fromtimestamp(os.path.getmtime(f)).strftime('%Y-%m-%d %H:%M')
    flag = '/' if  os.path.isdir(f)  else ''
    print('%10d %s %s%s'  % (fsize,mtime,f,flag))
# #在当前工作目录下，创建一个目录
# # os.mkdir('test')
#
# #改变当前工作的目录
# # os.chdir('/test')   #linux系统中可以这么写
#
# os.chdir(r'D:\Python_study_120191080505\exercises\class8\list')
#
# print(os.getcwd())